package org.me.marble;

/**
*
* @author tungi
*/

public class MyMath{
    //round to 'n' decimal
    public static float makeRound(float f,int n){
        double pow=Math.pow(10,n);
        return (float)(Math.round(f*pow)/pow);
    }

    public static double makeRound(double f,int n){
        double pow=Math.pow(10,n);
        return (float)(Math.round(f*pow)/pow);
    }

    public static float RadtoDegree(double rad){
        return 180*(float)rad/(float)Math.PI;
    }
}
